package com.castle.fortress.admin.contract.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 审查尺度枚举
 * 
 * @author
 * @since 2025-04-23
 */
@Getter
@AllArgsConstructor
public enum IntensityEnum {
    
    STRONG("strong", "强势"),
    WEAK("weak", "弱势"),
    EQUAL("equal", "均势");
    
    /**
     * 编码
     */
    private final String code;
    
    /**
     * 描述
     */
    private final String desc;
    
    /**
     * 根据编码获取枚举
     * 
     * @param code 编码
     * @return 枚举实例
     */
    public static IntensityEnum getByCode(String code) {
        for (IntensityEnum intensityEnum : IntensityEnum.values()) {
            if (intensityEnum.getCode().equals(code)) {
                return intensityEnum;
            }
        }
        return null;
    }
} 